package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * SdCustUserAccount generated by hbm2java
 */
@Entity
@Table(name="sd_cust_user_account"
    ,catalog="ncsc_erp"
    , uniqueConstraints = @UniqueConstraint(columnNames="CUST_USER_NAME") 
)
public class SdCustUserAccount  implements java.io.Serializable {


     private long custUserNo;
     private SdCust sdCust;
     private String custUserName;
     private String custUserPassword;
     private String custUserEmail;
     private String custUserDisplayName;
     private String custUserFirstName;
     private String custUserLastName;
     private String custUserProfileImageFileName;
     private String custUserMemo;
     private Long custUserUpdateByEmpNo;
     private Date custUserUpdateDtm;
     private Set<ScVoteFriend> scVoteFriendsForCustUserNo = new HashSet<ScVoteFriend>(0);
     private Set<ScVoteFriend> scVoteFriendsForFriendCustUserNo = new HashSet<ScVoteFriend>(0);
     private Set<ScVoteFriendGroupMember> scVoteFriendGroupMembers = new HashSet<ScVoteFriendGroupMember>(0);
     private Set<ScVoteTransComment> scVoteTransComments = new HashSet<ScVoteTransComment>(0);
     private Set<ScVoteTrans> scVoteTranses = new HashSet<ScVoteTrans>(0);
     private Set<ScVoteFriendGroup> scVoteFriendGroups = new HashSet<ScVoteFriendGroup>(0);
     private Set<SdCustUserParameter> sdCustUserParameters = new HashSet<SdCustUserParameter>(0);

    public SdCustUserAccount() {
    }

	
    public SdCustUserAccount(long custUserNo) {
        this.custUserNo = custUserNo;
    }
    public SdCustUserAccount(long custUserNo, SdCust sdCust, String custUserName, String custUserPassword, String custUserEmail, String custUserDisplayName, String custUserFirstName, String custUserLastName, String custUserProfileImageFileName, String custUserMemo, Long custUserUpdateByEmpNo, Date custUserUpdateDtm, Set<ScVoteFriend> scVoteFriendsForCustUserNo, Set<ScVoteFriend> scVoteFriendsForFriendCustUserNo, Set<ScVoteFriendGroupMember> scVoteFriendGroupMembers, Set<ScVoteTransComment> scVoteTransComments, Set<ScVoteTrans> scVoteTranses, Set<ScVoteFriendGroup> scVoteFriendGroups, Set<SdCustUserParameter> sdCustUserParameters) {
       this.custUserNo = custUserNo;
       this.sdCust = sdCust;
       this.custUserName = custUserName;
       this.custUserPassword = custUserPassword;
       this.custUserEmail = custUserEmail;
       this.custUserDisplayName = custUserDisplayName;
       this.custUserFirstName = custUserFirstName;
       this.custUserLastName = custUserLastName;
       this.custUserProfileImageFileName = custUserProfileImageFileName;
       this.custUserMemo = custUserMemo;
       this.custUserUpdateByEmpNo = custUserUpdateByEmpNo;
       this.custUserUpdateDtm = custUserUpdateDtm;
       this.scVoteFriendsForCustUserNo = scVoteFriendsForCustUserNo;
       this.scVoteFriendsForFriendCustUserNo = scVoteFriendsForFriendCustUserNo;
       this.scVoteFriendGroupMembers = scVoteFriendGroupMembers;
       this.scVoteTransComments = scVoteTransComments;
       this.scVoteTranses = scVoteTranses;
       this.scVoteFriendGroups = scVoteFriendGroups;
       this.sdCustUserParameters = sdCustUserParameters;
    }
   
     @Id 

    
    @Column(name="CUST_USER_NO", unique=true, nullable=false)
    public long getCustUserNo() {
        return this.custUserNo;
    }
    
    public void setCustUserNo(long custUserNo) {
        this.custUserNo = custUserNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_NO")
    public SdCust getSdCust() {
        return this.sdCust;
    }
    
    public void setSdCust(SdCust sdCust) {
        this.sdCust = sdCust;
    }

    
    @Column(name="CUST_USER_NAME", unique=true, length=50)
    public String getCustUserName() {
        return this.custUserName;
    }
    
    public void setCustUserName(String custUserName) {
        this.custUserName = custUserName;
    }

    
    @Column(name="CUST_USER_PASSWORD", length=50)
    public String getCustUserPassword() {
        return this.custUserPassword;
    }
    
    public void setCustUserPassword(String custUserPassword) {
        this.custUserPassword = custUserPassword;
    }

    
    @Column(name="CUST_USER_EMAIL", length=100)
    public String getCustUserEmail() {
        return this.custUserEmail;
    }
    
    public void setCustUserEmail(String custUserEmail) {
        this.custUserEmail = custUserEmail;
    }

    
    @Column(name="CUST_USER_DISPLAY_NAME", length=100)
    public String getCustUserDisplayName() {
        return this.custUserDisplayName;
    }
    
    public void setCustUserDisplayName(String custUserDisplayName) {
        this.custUserDisplayName = custUserDisplayName;
    }

    
    @Column(name="CUST_USER_FIRST_NAME", length=100)
    public String getCustUserFirstName() {
        return this.custUserFirstName;
    }
    
    public void setCustUserFirstName(String custUserFirstName) {
        this.custUserFirstName = custUserFirstName;
    }

    
    @Column(name="CUST_USER_LAST_NAME", length=100)
    public String getCustUserLastName() {
        return this.custUserLastName;
    }
    
    public void setCustUserLastName(String custUserLastName) {
        this.custUserLastName = custUserLastName;
    }

    
    @Column(name="CUST_USER_PROFILE_IMAGE_FILE_NAME", length=300)
    public String getCustUserProfileImageFileName() {
        return this.custUserProfileImageFileName;
    }
    
    public void setCustUserProfileImageFileName(String custUserProfileImageFileName) {
        this.custUserProfileImageFileName = custUserProfileImageFileName;
    }

    
    @Column(name="CUST_USER_MEMO", length=500)
    public String getCustUserMemo() {
        return this.custUserMemo;
    }
    
    public void setCustUserMemo(String custUserMemo) {
        this.custUserMemo = custUserMemo;
    }

    
    @Column(name="CUST_USER_UPDATE_BY_EMP_NO")
    public Long getCustUserUpdateByEmpNo() {
        return this.custUserUpdateByEmpNo;
    }
    
    public void setCustUserUpdateByEmpNo(Long custUserUpdateByEmpNo) {
        this.custUserUpdateByEmpNo = custUserUpdateByEmpNo;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="CUST_USER_UPDATE_DTM", length=19)
    public Date getCustUserUpdateDtm() {
        return this.custUserUpdateDtm;
    }
    
    public void setCustUserUpdateDtm(Date custUserUpdateDtm) {
        this.custUserUpdateDtm = custUserUpdateDtm;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdCustUserAccountByCustUserNo")
    public Set<ScVoteFriend> getScVoteFriendsForCustUserNo() {
        return this.scVoteFriendsForCustUserNo;
    }
    
    public void setScVoteFriendsForCustUserNo(Set<ScVoteFriend> scVoteFriendsForCustUserNo) {
        this.scVoteFriendsForCustUserNo = scVoteFriendsForCustUserNo;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdCustUserAccountByFriendCustUserNo")
    public Set<ScVoteFriend> getScVoteFriendsForFriendCustUserNo() {
        return this.scVoteFriendsForFriendCustUserNo;
    }
    
    public void setScVoteFriendsForFriendCustUserNo(Set<ScVoteFriend> scVoteFriendsForFriendCustUserNo) {
        this.scVoteFriendsForFriendCustUserNo = scVoteFriendsForFriendCustUserNo;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdCustUserAccount")
    public Set<ScVoteFriendGroupMember> getScVoteFriendGroupMembers() {
        return this.scVoteFriendGroupMembers;
    }
    
    public void setScVoteFriendGroupMembers(Set<ScVoteFriendGroupMember> scVoteFriendGroupMembers) {
        this.scVoteFriendGroupMembers = scVoteFriendGroupMembers;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdCustUserAccount")
    public Set<ScVoteTransComment> getScVoteTransComments() {
        return this.scVoteTransComments;
    }
    
    public void setScVoteTransComments(Set<ScVoteTransComment> scVoteTransComments) {
        this.scVoteTransComments = scVoteTransComments;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdCustUserAccount")
    public Set<ScVoteTrans> getScVoteTranses() {
        return this.scVoteTranses;
    }
    
    public void setScVoteTranses(Set<ScVoteTrans> scVoteTranses) {
        this.scVoteTranses = scVoteTranses;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdCustUserAccount")
    public Set<ScVoteFriendGroup> getScVoteFriendGroups() {
        return this.scVoteFriendGroups;
    }
    
    public void setScVoteFriendGroups(Set<ScVoteFriendGroup> scVoteFriendGroups) {
        this.scVoteFriendGroups = scVoteFriendGroups;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdCustUserAccount")
    public Set<SdCustUserParameter> getSdCustUserParameters() {
        return this.sdCustUserParameters;
    }
    
    public void setSdCustUserParameters(Set<SdCustUserParameter> sdCustUserParameters) {
        this.sdCustUserParameters = sdCustUserParameters;
    }




}


